/* calendar.less */

// Calendar event background colours defined.
.calendar_event_course {
    background-color: @calendar-event-course-color;
}
.calendar_event_global {
    background-color: @calendar-event-global-color;
}
.calendar_event_group {
    background-color: @calendar-event-group-color;
}
.calendar_event_user {
    background-color: @calendar-event-user-color;
}

// Calendar restyling.
.path-calendar {
    .calendartable {
        width: 100%;
        th, td {
            width: 14%;
            vertical-align: top;
            text-align: center;
            border: 0;
        }
    }
    .calendar-controls {
        .previous,
        .next,
        .current {
            display: block;
            float: left;
            width: 12%;
        }
        .previous {
            text-align: left;
        }
        .current {
            text-align: center;
            width: 76%;
        }
        .next {
            text-align: right;
        }
    }
    .filters {
        table {
            border-collapse: separate;
            border-spacing: 2px;
            width: 100%;
        }
    }
    .cal_courses_flt {
        label {
            margin-right: .45em;
        }
    }
    .maincalendar {
        vertical-align: top;
        padding: 0;
        .bottom {
            text-align: center;
            padding: 5px 0 0 0;
        }
        .heightcontainer {
            height: 100%;
            position: relative;
        }
        .calendarmonth {
            width: 98%;
            margin: 10px auto;
        }
        .calendarmonth {
            ul {
                margin: 0;
                li {
                    list-style-type: none;
                    margin-top: 4px;
                }
            }
            td {
                height: 5em;
            }
        }
        .calendar-controls {
            .previous,
            .next {
                width: 30%;
            }
            .current {
                width: 39.95%;
            }
        }
        .controls {
            width: 98%;
            margin: 10px auto;
        }
        .calendar_event_course,
        .calendar_event_global,
        .calendar_event_group,
        .calendar_event_user {
            border-width: 1px 1px 1px 12px;
            border-style: solid;
        }
        .calendar_event_course {
            border-color: @calendar-event-course-color;
        }
        .calendar_event_global {
            border-color: @calendar-event-global-color;
        }
        .calendar_event_group {
            border-color: @calendar-event-group-color;
        }
        .calendar_event_user {
            border-color: @calendar-event-user-color;
        }
        .calendar-event-panel {
            background-color: @gray-lighter;
            border: 2px solid @gray-lighter;
            .yui3-overlay-content {
                padding: 19px;
                background-color: lighten(@well-bg, 3%);
                border: 1px solid darken(@well-bg, 7%);
                border-radius: @border-radius-base;
                .box-shadow(inset 0 1px 1px rgba(0, 0, 0, .05));
            }
        }
        .calendar-controls {
            .current {
                font-family: @headings-font-family;
                font-weight: @headings-font-weight;
                color: @headings-color;
                font-size: 25px;
                line-height: 1.2;
            }
        }
        .calendartable {
            td, li {
                padding: 5px;
            }
            li {
                padding-left: 10px;
                text-align: left;
            }
        }
        .header {
            overflow: hidden;
            .buttons {
                float: right;
            }
        }
        .eventlist {
            .event {
                width: 100%;
                border-spacing: 0;
                border-collapse: separate;
                position: relative;
                padding: 19px;
                margin-bottom: 20px;
                background-color: lighten(@well-bg, 3%);
                border: 1px solid darken(@well-bg, 7%);
                border-radius: @border-radius-base;
                .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
                .picture {
                    vertical-align: text-top;
                }
                .topic {
                    .name {
                        font-size: @font-size-large;
                        font-weight: 200;
                        line-height: 24px;
                        float: left;
                    }
                    .name,
                    .course {
                        margin-bottom: 5px;
                    }
                    .date {
                        float: right;
                    }
                }
                .course,
                .subscription {
                    float: left;
                    clear: left;
                }
                .side {
                    width: 22px;
                }
                .description {
                    background-color: #FFF;
                    padding: 5px;
                    .commands {
                        position: absolute;
                        right: 0;
                        top: 0;
                        margin: 3px;
                    }
                }
                .commands {
                    a {
                        margin: 0 3px;
                    }
                }
            }
        }
    }
}

// RTL overrides for main calendar.
.dir-rtl.path-calendar {
    .cal_courses_flt {
        label {
            margin-left: .45em;
            margin-right: 0;
        }
    }
    .maincalendar {
        .calendar_event_course,
        .calendar_event_global,
        .calendar_event_group,
        .calendar_event_user {
            border-left-width: 1px;
            border-right-width: 12px;
        }
        .calendar-controls {
            .next {
                text-align: left;
            }
            .previous {
                text-align: right;
            }
        }
        .calendartable {
            td, li {
                text-align: right;
            }
            li {
                padding-right: 10px;
                padding-left: 5px;
            }
        }
        .header {
            .buttons {
                float: left;
            }
        }
        .eventlist {
            .event {
                .topic {
                    .name {
                        float: right;
                    }
                    .date {
                        float: left;
                    }
                }
                .description {
                    .commands {
                        right: inherit;
                        left: 0;
                    }
                }
                .course,
                .subscription {
                    float: right;
                    clear: right;
                }
            }
        }
    }
}
// Calendar export.
#page-calendar-export {
    .indent {
        padding-left: 20px;
    }
}

// Block minicalendar.
.block {
    .minicalendar {
        max-width: 280px;
        margin: 0 auto;
        width: 100%;
        th, td {
            padding: 2px;
            font-size: 0.8em;
            text-align: center;
        }
        td {
            &.weekend {
                color: @text-muted;
            }
        }
    }
    .calendar-event-panel {
        background-color: @gray-lighter;
        border: 1px solid @gray-lighter;
        .yui3-overlay-content {
            padding: 19px;
            background-color: lighten(@well-bg, 3%);
            border: 1px solid darken(@well-bg, 7%);
            border-radius: @border-radius-base;
            .box-shadow(inset 0 1px 1px rgba(0 ,0 ,0 , .05));
            h2 {
                &.eventtitle {
                    line-height: 1.2;
                    font-size: 18px;
                }
            }
            .eventcontent {
                img {
                    padding-right: 5px;
                }
            }
        }
    }
    .calendar-controls {
        .previous,
        .current,
        .next {
            display: block;
            float: left;
        }
        .previous {
            text-align: left;
            width: 12%;
        }
        .current {
            text-align: center;
            width: 76%;
        }
        .next {
            text-align: right;
            width: 12%;
        }
    }
    .calendar_filters {
        ul {
            list-style: none;
            margin: 0;
        }
        li {
            margin-bottom: 0.2em;
            span {
                img {
                    padding: 0 0.2em;
                }
            }
        }
        .eventname {
            padding-left: 0.2em;
        }
    }
    .content {
        h3 {
            &.eventskey {
                margin-top: 0.5em;
            }
        }
    }
}

@media (min-width: 768px) {
    #page-calender-view {
        .container-fluid {
            min-width: 1024px;
        }
    }
}
